<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>
<%--<c:set var="module" value="news"/>--%>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/news/save?id=${n.id }" id="detail-form" class="form-horizontal" method="post">
            <div class="form-group">
                <!-- 部门名 -->
                <label class="col-sm-2 control-label">部门名</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="name" name="name" value="${n.name }">
                </div>

                <!-- 编号 -->
              <%--  <label class="col-sm-2 control-label">编号</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" name="serialNum" value="${n.serialNum }">
                </div>--%>
                <!-- 状态，1-未上架，2-已上架，3-已下架 -->
                <label class="col-sm-2 control-label">状态</label>
                <div class="col-sm-4">
                    <select class="form-control" id="status" name="status" value="${n.status }">
                        <option value="1" <c:if test="${'2' eq n.status }">selected</c:if>>未上架</option>
                        <option value="2" <c:if test="${'1' eq n.status }">selected</c:if>>已上架</option>
                        <option value="3" <c:if test="${'1' eq n.status }">selected</c:if>>已下架</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <!-- 状态，1-未上架，2-已上架，3-已下架 -->
              <%--  <label class="col-sm-2 control-label">状态</label>
                <div class="col-sm-4">
                    <select class="form-control" name="status" value="${n.status }">
                        <option value="1" <c:if test="${'2' eq n.status }">selected</c:if>>未上架</option>
                        <option value="2" <c:if test="${'1' eq n.status }">selected</c:if>>已上架</option>
                        <option value="3" <c:if test="${'1' eq n.status }">selected</c:if>>已下架</option>
                    </select>
                </div>--%>
                <!-- 标题 -->
                <label class="col-sm-2 control-label">标题</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="title" name="title" value="${n.title }">
                </div>

                <!-- 概要 -->
                <label class="col-sm-2 control-label">概要</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="summary" name="summary" value="${n.summary }">
                </div>
            </div>
            <div class="form-group">


                <%-- <!-- 缩略图 -->
                 <label class="col-sm-2 control-label">缩略图</label>
                 <div class="col-sm-4">
                     <input type="text" class="form-control" name="thumb" value="${n.thumb }">
                 </div>--%>
                <!-- 新闻文本内容 -->
                <label class="col-sm-2 control-label">创建人</label>
                <div class="col-sm-4">
                    <%--<input type="hidden" id="creator-id" name="creator.id" value="${n.creator.id }" class="form-control">--%>
                    <input type="text"  placeholder="请选择创建人" class="form-control" id="creator-name" value="${n.creator.id }"
                   onclick="bring({
                                        url:'${ctx}/admin/user/search',
                                        name: 'id',
                                        idInput: 'creater-id',
                                        nameInput: 'creator-name'
                                        })"/>
                </div>
                    <!-- createTime -->
                        <label class="col-sm-2 control-label">创建时间</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" id="createTime" name="createTime" value="<fmt:formatDate value='${n.createTime }' pattern='yyyy-MM-dd'/>" onclick="laydate({format: 'YYYY-MM-DD'})">
                        </div>

            </div>
            <div class="form-group">

                <!-- 新闻文本内容 -->
                <%--<label class="col-sm-2 control-label">新闻文本内容</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" name="content" value="${n.content }" readonly="readonly">
                </div>--%>

                <!-- creator -->


                <label class="col-sm-2 control-label">更新人</label>
                <div class="col-sm-4">
                    <input type="hidden" id="updator-id" name="updator.id" value="${n.updator.id }" class="form-control">
                    <input type="text"  placeholder="请选择更新人" class="form-control" id="updator-name" value="${n.updator.id }"
                    onclick="bring({
                                        url:'${ctx}/admin/user/search',
                                        name: 'id',
                                        idInput: 'updator-id',
                                        nameInput: 'updator-name'
                                        })"/>

                </div>
                <!-- updateTime -->
                <label class="col-sm-2 control-label">更新时间</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="updateTime" name="updateTime" value="<fmt:formatDate value='${n.updateTime }' pattern='yyyy-MM-dd'/>" onclick="laydate({format: 'YYYY-MM-DD'})">
                </div>
            </div>
            <div class="form-group">

                <%-- <!-- createTime -->
                 <label class="col-sm-2 control-label">创建时间</label>
                 <div class="col-sm-4">
                     <input type="text" class="form-control" name="createTime" value="<fmt:formatDate value='${n.createTime }' pattern='yyyy-MM-dd'/>" &lt;%&ndash;onclick="laydate({format: 'YYYY-MM-DD'})"&ndash;%&gt; readonly="readonly">
                 </div>
                 --%>
                <!-- updator -->



                <label class="col-sm-2 control-label">新闻文本内容</label>
                <div class="col-sm-4">
                    <textarea class="form-control" id="content" name="content" >${n.content }</textarea>
                </div>
            </div>
            <%-- <div class="form-group">

 &lt;%&ndash;				 <!-- updateTime -->
                  <label class="col-sm-2 control-label">更新时间</label>
                  <div class="col-sm-4">
                      <input type="text" class="form-control" name="updateTime" value="<fmt:formatDate value='${n.updateTime }' pattern='yyyy-MM-dd'/>" &lt;%&ndash;onclick="laydate({format: 'YYYY-MM-DD'})"&ndash;%&gt; readonly="readonly">
                  </div>
                  &ndash;%&gt;
              </div>	--%>
</div>

<%@include file="/common/foot.jsp" %>

</body>
</html>
